function columns(vm) {
  const cols = [
    {
      title: '序号',
      key: 'rowIndex',
      width: 60,
      align: 'center',
      customRender: function (t, row, index) {
        if (row.totalName == '合计') {
          return {
            children: vm.transformVnode('合计'),
            attrs: {
              colSpan: 2,
            },
          }
        } else {
          return Number(index)
        }
      }
    },
    {
      title: '具体事项',
      align: 'center',
      dataIndex: 'jtsx',
      key: 'jtsx',
      width: 150,
      customRender: function (text, row, index) {
        if (row.totalName == '合计') {
          return {
            attrs: {
              colSpan: 0,
            },
          }
        } else
          return {
            children: vm.TransformVnodeEllipsis(text, row, 'jtsx')
          }
      }
    },
    {
      title: '已发生未列账劳务费/分包成本',
      align: 'right',
      dataIndex: 'yfsWlzLwf',
      key: 'yfsWlzLwf',
      scopedSlots: { customRender: 'yfsWlzLwf' },
    },
    {
      title: '其中：账面预付/其他应收款劳务费',
      align: 'right',
      dataIndex: 'zmyfQtskLwf',
      key: 'zmyfQtskLwf',
      scopedSlots: { customRender: 'zmyfQtskLwf' },
    },
    {
      title: '已发生未列账材料成本',
      align: 'right',
      dataIndex: 'yfsWlzClcb',
      key: 'yfsWlzClcb',
      scopedSlots: { customRender: 'yfsWlzClcb' },
    },
    {
      title: '其中：账面预付/其他应收款-材料费',
      align: 'right',
      dataIndex: 'zmyfQtskClf',
      key: 'zmyfQtskClf',
      scopedSlots: { customRender: 'zmyfQtskClf' },
    },
    {
      title: '已发生未列账机械费',
      align: 'right',
      dataIndex: 'yfsWlzJxf',
      key: 'yfsWlzJxf',
      scopedSlots: { customRender: 'yfsWlzJxf' },
    },
    {
      title: '其中：账面预付/其他应收款-机械费',
      align: 'right',
      dataIndex: 'zmyfQtskJxf',
      key: 'zmyfQtskJxf',
      scopedSlots: { customRender: 'zmyfQtskJxf' },
    },
    {
      title: '已发生未列账其他费用',
      align: 'right',
      dataIndex: 'yfsWlzQtfy',
      key: 'yfsWlzQtfy',
      scopedSlots: { customRender: 'yfsWlzQtfy' },
    },
    {
      title: '其中：预付/其他应收款-其他款项',
      align: 'right',
      dataIndex: 'zmyfQtskQtkx',
      key: 'zmyfQtskQtkx',
      scopedSlots: { customRender: 'zmyfQtskQtkx' },
    },
    {
      title: '备注',
      align: 'center',
      dataIndex: 'remark',
      scopedSlots: { customRender: 'remark' },
      key: 'remark',
      width: 150
    },
    {
      dataIndex: 'action',
      align: 'center',
      title: "操作",
      scopedSlots: { customRender: 'action' },
      key: 'action',
      width: 100,
      fixed: 'right',
    }
  ]
  return cols
}

export default columns